package com.shop.service.implement;

import java.util.List;

import com.shop.dao.ISortDao;
import com.shop.pojo.Sort;
import com.shop.service.ISortService;

public class SortService implements ISortService {
	private ISortDao sortDao;
	
	public List<Sort> findForIndex(){
		
		return sortDao.findFirstClassify();
	}
	public Sort findById(Integer sortid){
		return sortDao.findById(sortid);
	}
	public List<Sort> findAll() {
		
		return sortDao.findAll();
	}
	public void add(Sort sort) {
		sortDao.save(sort);
	}
	public void delete(int sortid){
		sortDao.deleteById(sortid);
	}
	
	public ISortDao getSortDao() {
		return sortDao;
	}
	public void setSortDao(ISortDao sortDao) {
		this.sortDao = sortDao;
	}

	
	

}
